const seq = require('../connections/mysql_connect'),
      { INT, STRING } = require('../../config/db_type_config');

const PosterBook = seq.define('poster_book', {
    cid: {
        comment: 'book ID',
        type: INT,
        allowNull: false,
        unique: true
    },
    imgUrl: {
        comment: 'book`s img link',
        type: STRING,
        allowNull: false
    },
    imgKey: {
        comment: 'qiniu image name',
        type: STRING,
        allowNull: false
    },
    status: {
        comment: 'poster book status',
        type: INT,
        defaultValue: 1,
        allowNull: false
    }
});

module.exports = PosterBook;